package com.sokal.easycare.modules.follow.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 关注信息Entity
 * 
 * @author nibo
 * @version 2017-03-27
 */
public class UserFollow extends DataEntity<UserFollow> {

	private static final long serialVersionUID = 1L;
	private String userId; // user_id
	private String offerPackId; // 序列号
	private Date stateDate; // 状态时间，最后添加到购物车的时间。
	private String type; // type

	public UserFollow() {
		super();
	}

	public UserFollow(String id) {
		super(id);
	}

	@Length(min = 0, max = 30, message = "序列号长度必须介于 0 和 30 之间")
	public String getOfferPackId() {
		return offerPackId;
	}

	public void setOfferPackId(String offerPackId) {
		this.offerPackId = offerPackId;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStateDate() {
		return stateDate;
	}

	public void setStateDate(Date stateDate) {
		this.stateDate = stateDate;
	}

	@Length(min = 0, max = 11, message = "type长度必须介于 0 和 11 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

}